# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=py3-bleach
pkgver=3.1.5
pkgrel=0
pkgdesc="whitelist-based HTML sanitizing library"
options="!check" # https://github.com/mozilla/bleach/issues/503
url="https://github.com/mozilla/bleach"
arch="noarch"
license="Apache-2.0"
depends="python3 py3-six py3-webencodings"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="$pkgname-$pkgver.tar.gz::https://github.com/mozilla/bleach/archive/v$pkgver.tar.gz"
builddir="$srcdir/bleach-$pkgver"

# secfixes:
#   3.1.2-r0:
#     - CVE-2020-6816
#   3.1.1-r0:
#     - CVE-2020-6802

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="7a391588115e474dde1ba719e0c3decb1a195dd8191e9384f2114c80673da8e5d86f196cd988529f724659b7e4960e417db77458023646f8954bf91ab78eb8c9  py3-bleach-3.1.5.tar.gz"
